/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.fee.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.fee.entity.Agreement;
import com.jeeplus.modules.fee.entity.Consignor;
import com.jeeplus.modules.fee.entity.FeeData;
import com.jeeplus.modules.sys.entity.Office;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 计费协议数据源DAO接口
 * @author cyf
 * @version 2016-11-21
 */
@MyBatisMapper
public interface FeeDataMapper extends BaseMapper<FeeData> {

	public List<Agreement> findListByagreement(Agreement agreement);
	public List<Office> findListByoffice(Office office);
	public List<Consignor> findListByFeeConsignor(Consignor feeConsignor);

	//根据数据源和结算状态统计明细
	int countDetailByData(@Param(value = "dataId") String dataId, @Param(value = "status") Integer status);

	//删除数据源计算出来的计费明细
	void deleteDetailsByData(@Param(value = "dataId") String dataId);

	//根据结算方ID查询数据源信息
	public FeeData findInfoByfeeConsignorID(String feeConsignor);
}